package defpackage; import cn.wps.shareplay.message.Message; import com.mopub.nativeads.MoPubNativeAdPositioning; import java.io.IOException; import java.io.PrintStream; /* renamed from: aadp reason: default package */ public final class aadp implements aado { static final long[] BSM = {0, 0, -1, -1}; static final int[] BSN = new int[0]; public static final String[] BSO = {"", Message.SEPARATE, "-", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ".", null, null}; public static final String[] BSP = {"DEFAULT", "INCOMMENT", "NESTED_COMMENT", "INQUOTEDSTRING"}; public static final int[] BSQ = {-1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, -1, -1, -1, -1, -1}; static final long[] BSR = {2031623}; static final long[] BSS = {40}; static final long[] BST = {8}; static final long[] BSU = {65488}; int BSK; public PrintStream BSL; private final int[] BSW; private final int[] BSX; StringBuffer BSY; int BSZ; int BTa; protected char BTb; int BTc; int BTd; int BTe; int BTf; int BTg; int BTh; protected aadr BUa; public aadp(aadr aadr) { this.BSL = System.out; this.BSW = new int[4]; this.BSX = new int[8]; this.BTc = 0; this.BTd = 0; this.BUa = aadr; } public aadp(aadr aadr, int i) { this(aadr); axq(i); } private final void axp(int i) { if (this.BSW[i] != this.BTf) { int[] iArr = this.BSX; int i2 = this.BTe; this.BTe = i2 + 1; iArr[i2] = i; this.BSW[i] = this.BTf; } } private void axq(int i) { if (i >= 4 || i < 0) { throw new aadt("Error: Ignoring invalid lexical state : " + i + ". State unchanged.", 2); } this.BTc = i; } private final void gUB() { this.BTf = -2147483647; int i = 4; while (true) { int i2 = i - 1; if (i > 0) { this.BSW[i2] = Integer.MIN_VALUE; i = i2; } else { return; } } } private aads gUN() { int i = this.BTh; aads aads = new aads(); aads.BTv = this.BTh; String str = BSO[this.BTh]; if (str == null) { str = this.BUa.gUI(); } aads.image = str; aads.BTw = this.BUa.gUH(); aads.BTx = this.BUa.gUG(); aads.BTy = this.BUa.gUF(); aads.BTz = this.BUa.gUE(); return aads; } private final int nu(int i, int i2) { this.BTh = i2; this.BTg = 0; return 1; } private final int nv(int i, int i2) { int i3 = 0; this.BTe = 4; int i4 = 1; this.BSX[0] = 4; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: if ((4294977024L & j) != 0) { i5 = 3; axp(0); continue; } else { continue; } case 1: if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 17) { i5 = 17; } axp(1); continue; } case 3: if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 19) { i5 = 19; } axp(3); continue; } case 4: if ((287948901175001088L & j) != 0) { if (i5 > 19) { i5 = 19; } axp(3); } else if ((4294977024L & j) != 0) { if (i5 > 3) { i5 = 3; } axp(0); } if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 17) { i5 = 17; } axp(1); continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 2: if ((576460743847706622L & j2) == 0) { continue; } else { if (i5 > 18) { i5 = 18; } axp(2); continue; } case 3: if ((576460743847706622L & j2) == 0) { continue; } else { if (i5 > 19) { i5 = 19; } axp(3); continue; } case 4: if ((576460743847706622L & j2) != 0) { if (i5 > 19) { i5 = 19; } axp(3); } if ((576460743847706622L & j2) == 0) { continue; } else { if (i5 > 18) { i5 = 18; } axp(2); continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 4 - i3; if (i4 != i3) { try { this.BTb = this.BUa.readChar(); } catch (IOException e) { } } return i2; } } private final int nw(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 8) { i5 = 8; continue; } else { continue; } case 1: if (i5 > 6) { i5 = 6; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 8) { i5 = 8; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 6) { i5 = 6; continue; } else { continue; } case 2: if (i5 > 8) { i5 = 8; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 8) { i5 = 8; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 6) { i5 = 6; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BUa.readChar(); } catch (IOException e) { } } return i2; } } private final int nx(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((-17179869185L & j) == 0) { continue; } else { if (i5 > 15) { i5 = 15; } axp(2); continue; } case 1: if (i5 > 14) { i5 = 14; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((-268435457 & j2) != 0) { if (i5 > 15) { i5 = 15; } axp(2); continue; } else if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 14) { i5 = 14; continue; } else { continue; } case 2: if ((-268435457 & j2) == 0) { continue; } else { if (i5 > 15) { i5 = 15; } axp(2); continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j3 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((BSM[i8] & j3) == 0) { continue; } else { if (i5 > 15) { i5 = 15; } axp(2); continue; } case 1: if ((BSM[i8] & j3) != 0 && i5 > 14) { i5 = 14; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BUa.readChar(); } catch (IOException e) { } } return i2; } } private final int ny(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 12) { i5 = 12; continue; } else { continue; } case 1: if (i5 > 9) { i5 = 9; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 12) { i5 = 12; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 9) { i5 = 9; continue; } else { continue; } case 2: if (i5 > 12) { i5 = 12; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 12) { i5 = 12; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 9) { i5 = 9; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BUa.readChar(); } catch (IOException e) { } } return i2; } } public final aads gUO() { int nu; int i; int nu2; int nu3; int nu4; boolean z; aads aads; String str = null; int i2 = 0; aads aads2 = null; while (true) { try { aadr aadr = this.BUa; aadr.BTm = -1; char readChar = aadr.readChar(); aadr.BTm = aadr.BTn; this.BTb = readChar; this.BSY = null; this.BSZ = 0; while (true) { switch (this.BTc) { case 0: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\"': nu4 = nu(0, 13); break; case '(': nu4 = nu(0, 4); break; case ',': nu4 = nu(0, 1); break; case '-': nu4 = nu(0, 2); break; case '.': nu4 = nu(0, 20); break; default: nu4 = nv(4, 0); break; } i = nu4; break; case 1: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu3 = nu(0, 7); break; case ')': nu3 = nu(0, 5); break; default: nu3 = nw(0, 0); break; } i = nu3; break; case 2: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu2 = nu(0, 10); break; case ')': nu2 = nu(0, 11); break; default: nu2 = ny(0, 0); break; } i = nu2; break; case 3: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\"': nu = nu(0, 16); break; default: nu = nx(0, 0); break; } i = nu; break; default: i = i2; break; } if (this.BTh != Integer.MAX_VALUE) { if (this.BTg + 1 < i) { this.BUa.axr((i - this.BTg) - 1); } if ((BSR[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aads gUN = gUN(); gUN.BUd = aads2; switch (this.BTh) { case 16: if (this.BSY == null) { this.BSY = new StringBuffer(); } StringBuffer stringBuffer = this.BSY; aadr aadr2 = this.BUa; int i3 = this.BSZ; int i4 = this.BTg + 1; this.BTa = i4; stringBuffer.append(aadr2.axs(i3 + i4)); gUN.image = this.BSY.substring(0, this.BSY.length() - 1); break; } if (BSQ[this.BTh] == -1) { return gUN; } this.BTc = BSQ[this.BTh]; return gUN; } else if ((BSS[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { if ((BST[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aads = gUN(); if (aads2 != null) { aads.BUd = aads2; aads2.BUc = aads; } } else { aads = aads2; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; aads2 = aads; i2 = i; } else { aads2 = aads; i2 = i; } } else { int i5 = this.BSZ; int i6 = this.BTg + 1; this.BTa = i6; this.BSZ = i5 + i6; switch (this.BTh) { case 6: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 7: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSK = 1; break; case 9: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 10: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSK++; break; case 11: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSK--; if (this.BSK == 0) { axq(1); break; } break; case 13: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 1); break; case 14: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BUa.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; } this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; try { this.BTb = this.BUa.readChar(); i2 = 0; } catch (IOException e) { i = 0; } } } } } catch (IOException e2) { this.BTh = 0; aads gUN2 = gUN(); gUN2.BUd = aads2; return gUN2; } } int gUF = this.BUa.gUF(); int gUE = this.BUa.gUE(); try { this.BUa.readChar(); this.BUa.axr(1); z = false; } catch (IOException e3) { String gUI = i <= 1 ? "" : this.BUa.gUI(); if (this.BTb == '\n' || this.BTb == '\r') { gUF++; z = true; str = gUI; gUE = 0; } else { gUE++; z = true; str = gUI; } } if (!z) { this.BUa.axr(1); str = i <= 1 ? "" : this.BUa.gUI(); } throw new aadt(z, this.BTc, gUF, gUE, str, this.BTb, 0); } }